/**
 * Dear programmer:
 * When I wrote this code, only god and I knew how it worked.
 * Now, only god knows it!
 *
 * @author: Pegasus  Date: 2018/11/24 Time: 23:24
 *
 * 报告状态
 */

/**
 * 报告的状态
 * @type {{None: number, Normal: number, Success: number, Error: number}}
 */
export const ReportStatus = {
  None: 0, // 没有
  Normal: 1, // 平常显示
  Success: 2, // 通过
  Error: 3 // 有错误
}

/**
 * 报告状态的颜色
 * @param status
 * @returns {string}
 * @constructor
 */
export const ReportTextColor = (status) => {
  switch (status) {
    case ReportStatus.None:
      return 'gray';
    case ReportStatus.Normal:
      return 'blue';
    case ReportStatus.Success:
      return 'green';
    case ReportStatus.Error:
      return 'red';
    default:
      return 'gray';
  }
}